package bs.app.android;

import android.content.Intent;
import android.net.Uri;

public class MIDlet {
	public String getAppProperty(String param){
		//TODO: code here
		if(param.equals("MIDlet-Version")){
			return Static.getSoftwareVersion();
		}
		return "";
	}
	public boolean platformRequest(String url) {
		//code here
		if (!url.startsWith("http://") && !url.startsWith("https://"))
			   url = "http://" + url;
		Intent browserIntent = new Intent(Intent.ACTION_VIEW, Uri.parse(url));
		Static.App.startActivity(browserIntent);

		return false;
	}
	public int checkPermission(String permission) {
		return -1;
	}
	
	public void notifyDestroyed() { Static.App.finish();}
	public void notifyPaused() {}
	public void resumeRequest() {}
	
	protected void pauseApp() {}
	protected void startApp() throws MIDletStateChangeException{}
	protected void destroyApp(boolean unconditional) throws MIDletStateChangeException {}
	
}
